#@layout()
#define head()
<script>
$(function(){
	var h = $(window).height();
	$("#contain").css("height",h-130+"px");
});

function yuyue(personId){
	var d = $("#d"+personId).val();
	var t = $("#t"+personId).val();
	$.post("#(CONTEXT_PATH??)/m/yuyue",{personId:personId,date:d,time:t},function(data){
		if(data=="suc"){
			$.toast("预约成功！", "text");
		}else{
			$.toast("已经有约！", "text");
		}
	});
}
</script>
#end

#define content()
	
  	<div  id="contain" class="weui-cells" style="overflow-y:auto" >
		#for(row : persons)
   	  	<div style="margin:20px;height: 40px;border-bottom:1px solid #f3f3f3;">
   	  	#(row.name??) 
   	  	<span style="color:red;">#(row.type??)</span>
   	  	<input type="date" id="d#(row.id??)" />
   	  	<select id="t#(row.id??)">
   	  		<option>上午</option>
   	  		<option>下午</option>
   	  	</select>
   	  	<a href="javascript:yuyue(#(row.id??));" class="weui-btn weui-btn_mini weui-btn_primary" style="position: absolute;right:10px;">预约</a>
   	  	</div>
   	  	#end
	</div>
	
	<script>
	</script>
#end
